from sqlalchemy import Column, Integer, String

from app.models.base import BaseModel


class AttributeDo(BaseModel):
    """属性表"""
    __tablename__ = 'attribute'
    __table_args__ = {"comment": "属性表"}

    attr_id = Column(Integer,
                           primary_key=True,
                           autoincrement=True,
                           comment="分组id")
    attr_name = Column(String(20), comment="属性名称")
    image_id = Column(Integer, comment="组图片")
    value_select = Column(String(512), comment="可选 值列表,逗号拼接")
    attr_type = Column(Integer,comment="属性类型0-销售1-基本")
    enable = Column(Integer, comment="启用状态0-禁用1-启用")
    category_id = Column(Integer, comment="分类ID")
